Port timers to OpenBSD, plus check for timer failures.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Oct 2012 00:10:47 +0000 (17:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Oct 2012 00:10:47 +0000 (17:10 -0700)
commitd8e0c55cdb0aa8dab3c3164ac8208af4dcdcaea4
treeaec348c884d4dd00a6fee8e1d4f45b736d98b843
parent0f614545ed7fccf8c4e9e412180e3f8ae8b3aa6d
Port timers to OpenBSD, plus check for timer failures.

OpenBSD problem reported by Han Boetes.
* profiler.c (setup_cpu_timer): Check for failure of timer_settime
and/or setitimer.
(Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
* syssignal.h (HAVE_ITIMERSPEC): New macro.  This is for platforms
like OpenBSD, which has timer_settime but does not declare it.
OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
whether to use itimerspec-related primitives.  All uses of
HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
ChangeLog
src/atimer.c
src/profiler.c
src/syssignal.h